#include "problems/169.h"
#include "gtest/gtest.h"
#include <vector>

using namespace std;

TEST(TestProblemSolutions, TestProblem169)
{
    problem_169::Solution s;
    vector<int> nums{3, 2, 3};
    ASSERT_EQ(s.majorityElement(nums), 3);
    nums = {2, 2, 1, 1, 1, 2, 2};
    ASSERT_EQ(s.majorityElement(nums), 2);
}